﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.Reporting.WebForms;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using trangbaocao.Models;
using System.ComponentModel;

namespace trangbaocao.Reports.Sort_Device
{
    public partial class ReportSort_Device : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {

                ReportViewer1.Reset();
                //DataTable dt = GetCustomerList();

                Sort_DeviceAssociateModel Sort_DeviceAssociateModel = new Sort_DeviceAssociateModel();

                List<Sort_DeviceAssociateModel> sort_DeviceAssociateModel = Sort_DeviceAssociateModel.getLoaithietbiIndex();

                ReportViewer1.LocalReport.ReportPath = "Reports/Sort_Device/List_Sort_Device/Sort_Device.rdlc";
                ReportViewer1.LocalReport.DataSources.Clear();
                ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("Sort_Device_DS", sort_DeviceAssociateModel));

                ReportViewer1.DataBind();
                ReportViewer1.LocalReport.Refresh();

            }
        }
    }
}